package com.cbh.feign.controller.permissions;


import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.system.SysMenu;


public interface MenuControllerBase {

	@RequestMapping(value = "/auth/v1/app/menu", method = RequestMethod.GET)
	public ApiResult<List<SysMenu>> getAllMenu(
			@RequestHeader(value = "accountToken", required = false) String accountToken,
			 @RequestParam(value = "accountToken", required = false) String accountToken1);

	@RequestMapping(value = "/auth/v1/app/menu/getAllFirstMenu", method = RequestMethod.GET)
	public ApiResult<List<SysMenu>> getAllFirstMenu(
			 @RequestHeader(value = "accountToken", required = false) String accountToken,
			 @RequestParam(value = "accountToken", required = false) String accountToken1);

	@RequestMapping(value = "/auth/v1/app/menu/{menuId}", method = RequestMethod.GET)
	public ApiResult<SysMenu> getMenuByID( @PathVariable("menuId") String menuId,
			 @RequestHeader(value = "accountToken",required = false) String accountToken,
			 @RequestParam(value = "accountToken", required = false) String accountToken1) ;

	@RequestMapping(value = "/auth/v1/app/menu/topMenu/{menuId}", method = RequestMethod.GET)
	public ApiResult<List<SysMenu>> getChildMenusByID( @PathVariable("menuId") String menuId,
			 @RequestHeader(value = "accountToken", required = false) String accountToken,
			@RequestParam(value = "accountToken", required = false) String accountToken1);

	@RequestMapping(value = "/auth/v1/app/menu/updateMenu", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> updateMenu(
			 @RequestHeader(value = "accountToken", required = false) String accountToken,
			 @RequestParam(value = "accountToken", required = false) String accountToken1,
			@RequestBody(required = true) SysMenu sysmenu);
}
